﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CalculatorFlexibe.Interfaces;

namespace CalculatorFlexibe.Implementations
{
    class StaticUploader : IUploader
    {
        public IOperation[] UploadOperations(IGetOperands getter, IChanger changer)
        {
            IOperation [] mas = {
                                    new AddOperation(getter, changer),
                                    new MulOperation(getter, changer),
                                    new SubOperation(getter, changer),
                                    new DevOperation(getter, changer),
                                    new QrtOperation(getter, changer)
                                };
            Array.Sort(mas, (o1, o2) => o1.priority.CompareTo(o2.priority));
            return mas;
        }

        public IOperation[] UploadOperations(string path, IGetOperands getter, IChanger changer)
        {
            throw new NotImplementedException();
        }
    }
}
